package cn.tedu.oop;

public class Test6_Abstract4 {
    public static void main(String[] args) {
        Demo3 d = new Demo5();
        d.save();
        d.delete(10);
        d.update("jack");
    }
}
abstract class Demo3{
    public void save(){
        System.out.println("数据保存成功！");
    }
    abstract public void delete(int id);
    abstract public void update(String name);
}
abstract class Demo4 extends Demo3{
    public void delete(int id){
        System.out.println("delete().."+id);
    }
}
class Demo5 extends Demo4{


    @Override
    public void update(String name) {
        System.out.println("update().."+name);
    }
}